import { ResPage, Exam } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 我的考试模块
 */
// 获取考试列表
export const getExamSelfList = (params: Exam.ReqExamSelfParams) => {
  return http.post<ResPage<Exam.ResExamSelfList>>(`/electcollect/trainTest/self/query`, params);
};
// 获取考试详情
export const getExamSelfDtl = (params: { controlId: number }) => {
  return http.post<Exam.ResTestInfo>(`/electcollect/trainTest/self/detail`, params);
};
// 获取试卷详情
export const getTestInfo = (params: { controlId: number }) => {
  return http.post<Exam.ResTestInfo>(`/electcollect/trainTest/self/answer`, params);
};
// 获取考试列表
export const submitTest = (params: Exam.ReqTestSubmitParams) => {
  return http.post<Exam.ResTestInfo>(`/electcollect/trainTest/self/query`, params);
};
